<?php
namespace app\admin\model;

use think\Model;

class Proaccount extends Model
{
    protected $schema = [
        'id' => 'int',
        'name' => 'string',
        'user_id' => 'int',
        'url' =>'string',
        'type' => 'int',
        'token' => 'string',
        'switch' => 'int',
        'description' => 'string',
        'blacklist_province' => 'string',
        'blacklist_country' => 'string',
        'blacklist_city' => 'string',
        'blacklist_ip' => 'string',
        'start_time' => 'datetime',
        'end_time' => 'datetime',
        'pro_time' => 'datetime',
    ];

    public function setTokenAttr($value) {

    }

    public function proplans() {
        return $this->hasMany(Proplan::class,'proaccount_id');
    }

}
